<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="../../public/public.jsp" %>

<% int rowColor = 1; 
	int pageSize = ((Integer)valueStack.findValue("pageForm.pageSize")).intValue();
	int pageNo = ((Integer)valueStack.findValue("pageForm.pageNo")).intValue();
	int rowNo = (pageNo-1)*pageSize+1;
%>
    <table border="0" width="100%" bgcolor="#999999" border"0" align="center" cellspacing="1"> 
    	<thead>
    	<s:if test="pagePosition.toLowerCase().equals('top') || pagePosition.toLowerCase().equals('all')">
    		<tr bgcolor="#FFFFFF">
    			<td colspan="20">
    				<ss:page value="pageForm"></ss:page>
    			</td>
    		</tr>
    		</s:if>
    		<tr height="20" bgcolor="#A0C6E5">
    			<th align="left" width="5%"><font color="snow" size="2">序号</font></th>
    			<th align="left" width="15%"><font color="snow" size="2">用户名</font></th>
    			<th align="left" width="20%"><font color="snow" size="2">表名</font></th>
    			<th align="left" width="15%"><font color="snow" size="2">类型</font></th>
    			<th align="left" width="20%"><font color="snow" size="2">日期</font></th>
    			<th align="left" width="15%"><font color="snow" size="2">结果</font></th>
    			<th align="left" width="15%"><font color="snow" size="2">内容</font></th>
    		</tr>
    	</thead>
    	<tbody>
    		<s:iterator value="data">
    		<% if((rowColor++ %2)==0){ %>
    		<tr bgcolor="#FFFFCC" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    		<%}else{ %>
    		<tr bgcolor="#FFFFFF" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    		<%} %>
    			<th><font color="#0000FF" size="2"><%=rowNo++ %></font></th>
    			<td><font color="#000000" size="2"><s:property value="userName"/></font></td>
    			<td><font color="#000000" size="2"><s:property value="tableName"/></font></td>
    			<td><font color="#000000" size="2"><s:property value="actionType"/></font></td>
    			<td><font color="#000000" size="2"><s:property value="beginTime"/></font></td>
    			<td><font color="#000000" size="2"><s:property value="actionResult"/></font></td>
				<td>
					<s:if test="actionType=='WRITE' || actionType=='DELETE' || actionType=='UPDATE' || actionType=='delete'|| actionType=='update' || actionType=='write'"><a href='javascript:goListLogs(<s:property value="logId"/>)'><font size="2">查看</font></s:if>
					<s:else><font size="2">查看</font></s:else>
				</td>
    		</tr>
    		</s:iterator>
    	</tbody>
		<tfoot>
			<s:if test="pagePosition.toLowerCase().equals('buttom') || pagePosition.toLowerCase().equals('all')">
    		<tr bgcolor="#FFFFFF">
    			<td colspan="20">
    				<ss:page value="pageForm"></ss:page>
    			</td>
    		</tr>
    		</s:if>
		</tfoot>
    </table>
